<?php

namespace app\api\controller;


use app\api\lists\RechargeLists;
use app\api\logic\RechargeLogic;
use app\api\validate\RechargeValidate;

class RechargeController extends BaseShopController
{
    /**
     * @notes 充值
     * @return \think\response\Json
     * @throws \think\Exception
     * @author ljj
     * @date 2022/12/16 16:03
     */
    public function recharge()
    {
        $params = (new RechargeValidate())->post()->goCheck('recharge',['user_id'=>$this->userId,'terminal'=>$this->userInfo['terminal']]);
        $result = (new RechargeLogic())->recharge($params);
        return $this->success('',$result);
    }

    /**
     * @notes 充值记录列表
     * @return \think\response\Json
     * @author ljj
     * @date 2022/6/9 3:13 下午
     */
    public function logLists()
    {
        return $this->dataLists(new RechargeLists());
    }
}